/**
 * @Project HGEMS
 * @Author Tran Manh Hung
 * @Email: hungtmit@gmail.com | tmh@xwebgate.com
 * @Copyright © 2010 TMH. All rights reserved
 * @Createdate Oct 8, 2010
 * @Createtime 9:29:21 PM
 */


package events
{
	import flash.events.Event;

	import valueObjects.HG_Product;


	public class HGProductEvent extends Event
	{
		public static const ADD_PRODUCT:String = "addProduct";

		public static const EDIT_PRODUCT:String = "editProduct";

		public static const UPDATE_PRODUCT:String = "updateProduct";

		public static const REMOVE_PRODUCT:String = "removeProduct";

		public static const BUY_PRODUCT:String = "buyProduct";

		public static const SELL_PRODUCT:String = "sellProduct";

		private var _product:HG_Product;

		public function HGProductEvent(type:String, product:HG_Product = null, bubbles:Boolean = false, cancelable:Boolean = false)
		{
			super(type, bubbles, cancelable);

			this.product = product;
		}

		override public function clone():Event
		{
			return new HGProductEvent(type, product, bubbles, cancelable);
		}

		public function get product():HG_Product
		{
			return _product;
		}

		public function set product(value:HG_Product):void
		{
			_product = value;
		}
	}
}